/*
 * @Description: 
 * @version: 
 * @Author: yyconion
 * @Date: 2021-07-22 13:35:32
 * @LastEditors: yyconion
 * @LastEditTime: 2021-11-16 14:07:04
 */
/**
 * @description:计算某一个日期距今天的天数
 * @param {*} date
 * @return {*}
 */
export function calculateDay(date) {
  let nowDate = new Date();
  let time = Math.abs(nowDate.getTime() - date.getTime())
  return Math.floor(time / (24 * 60 * 60 * 1000))
}


// 日期ms转换为s
export function getDateMills(date) {
  return Math.round(date / 1000);
}